<template>
    <div>
        <el-dialog title="回复内容" :visible.sync="replyArr.dialogFormVisible">
            <el-form :model="replyArr">
                <el-input
                    type="textarea"
                    :rows="2"
                    placeholder="请输入内容"
                    v-model="replyArr.content">
                </el-input>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="quFun">取 消</el-button>
                <el-button type="primary" @click="queFun">确 定</el-button>
            </div>
        </el-dialog>
    </div>
</template>
<script>
import {reply} from '../api/index'
export default {
    props:['replyArr'],
    data() {
        return {
            
        }
    },
    methods: {
        queFun(){
            reply({id:this.replyArr.id,content:{content:this.replyArr.content}}).then((res)=>{
                if(res.data.status==200){
                    this.$message({
                        message: res.data.msg,
                        type: 'success',
                        duration:1000
                    });
                    this.replyArr.dialogFormVisible=false
                    this.$emit('listarr',this.replyArr)
                }else{
                    this.$message({
                        message: res.data.msg,
                        type: 'error',
                        duration:1000
                    });
                    this.replyArr.dialogFormVisible=false
                }
            })
        },
        quFun(){
            this.replyArr.dialogFormVisible=false
        }
    },
}
</script>
<style lang="scss" scoped>

</style>